#ifndef __INRA_U_TINY_BLOCK_PRIV_H__
#define __INRA_U_TINY_BLOCK_PRIV_H__

#include <pthread.h>

#include "infra_tiny_block.h"

typedef struct _infra_tb_ctx {
    int8_t               _token[INFRA_TOKEN_MAX_SIZE];
    infra_dl_list_head_t _total_list;
    infra_dl_list_head_t _free_list;
    int32_t              _total_num;
    int32_t              _free_num;
    void                 *_vir_addr;
    int64_t              _phy_addr;
    bool                 _is_lock;
    pthread_spinlock_t   _lock;
} infra_tb_ctx_t;

typedef struct _infra_tb_node {
    infra_dl_list_head_t list;
    infra_dl_list_head_t free_list;
    uint16_t             magic;
    void                 *data;
} infra_tb_node_t;

#endif /* __INRA_U_TINY_BLOCK_PRIV_H__ */